import './assets/base.css';

import { createApp } from 'vue';
import { createPinia } from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';

import App from './App.vue';
import router from './router';
import 'virtual:windi.css';
import ElementPlus from 'element-plus';

import * as ElIcon from '@element-plus/icons-vue';
import 'element-plus/dist/index.css';
import { showToast } from '@/utils/message.js';
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

const app = createApp(App);
app.use(pinia);
app.provide('$showToast', showToast);

app.use(router);

app.use(ElementPlus);
Object.keys(ElIcon).forEach((key) => {
  app.component(key, ElIcon[key]);
});
app.mount('#app');
